﻿using System;
using DX_DailyUtil_1._0._1.ks.objt.share;
using System.Collections.Generic;
using System.Json;
using DX_DailyUtil_1._0._1.SerRef_WCF_Hitch;

namespace DX_DailyUtil_1._0._1.ks.objt.hitch
{
    public class Hitch : Objt_Base
    {
        public bool isLocked = false;
        public String hitchNumber;
        public String hitchTitle;
        public String hitchType;
        public List<Hitch_Cause> hitchCause = new List<Hitch_Cause>();

        public List<Hitch_Locate> hitchLocate = new List<Hitch_Locate>();
        public List<Hitch_Client> client = new List<Hitch_Client>();
        public List<User_Dealer> dealers = new List<User_Dealer>();
        public List<User_Labeler> labeler = new List<User_Labeler>();
        private bool isNotSave = true;
        public List<hitch_record> hitchCauses = new List<hitch_record>();
        private List<machine> hitchLocates = new List<machine>();

        public List<machine> HitchLocates
        {
            get { return hitchLocates; }
            set { hitchLocates = value; OnPropertyChanged("HitchLocates"); }
        }

        public List<hitch_record> HitchCauses
        {
            get { return hitchCauses; }
            set { hitchCauses = value; OnPropertyChanged("HitchCauses"); }
        }

        public bool IsNotSave
        {
            get { return isNotSave; }
            set { isNotSave = value; OnPropertyChanged("IsNotSave"); }
        }

        public bool IsLocked
        {
            get
            {
                return isLocked;
            }
            set
            {
                this.isLocked = value;
                this.isEnable = !this.isLocked;
                OnPropertyChanged("IsLocked");
                OnPropertyChanged("IsEnable");
            }
        }

        public String HitchNumber
        {
            get
            {
                return this.hitchNumber;
            }
            set
            {
                this.hitchNumber = value;
                OnPropertyChanged("HitchNumber");
            }
        }
        public String HitchTitle
        {
            get
            {
                return this.hitchTitle;
            }
            set
            {
                this.hitchTitle = value;
                OnPropertyChanged("HitchTitle");
            }
        }
        public String HitchType
        {
            get
            {
                return this.hitchType;
            }
            set
            {
                this.hitchType = value;
                OnPropertyChanged("HitchType");
            }
        }
        public List<Hitch_Cause> HitchCause
        {
            get
            {
                return this.hitchCause;
            }
            set
            {
                this.hitchCause = value;
                OnPropertyChanged("HitchCause");
            }
        }
        public List<Hitch_Locate> HitchLocate
        {
            get
            {
                return this.hitchLocate;
            }
            set
            {
                this.hitchLocate = value;
                OnPropertyChanged("HitchLocate");
            }
        }

        public List<Hitch_Client> Client
        {
            get
            {
                return this.client;
            }
            set
            {
                this.client = value;
                OnPropertyChanged("Client");
            }
        }

        public List<User_Dealer> Dealers
        {
            get
            {
                return this.dealers;
            }
            set
            {
                this.dealers = value;
                OnPropertyChanged("Dealers");
            }
        }
        public List<User_Labeler> Labeler
        {
            get
            {
                return this.labeler;
            }
            set
            {
                this.labeler = value;
                OnPropertyChanged("Labeler");
            }
        }

        public Hitch()
        {
            //this.dealers = new User_Dealer[25] { new User_Dealer("陈光明"), new User_Dealer("陈健威"), new User_Dealer("陈斯涛"), new User_Dealer("陈志勇"), new User_Dealer("邓博"), new User_Dealer("范晋添"), new User_Dealer("高伟杰"), new User_Dealer("桂家琪"), new User_Dealer("康文东"), new User_Dealer("李惠慈"), new User_Dealer("李晓健"), new User_Dealer("刘伟强"), new User_Dealer("吕旭辉"), new User_Dealer("杨清"), new User_Dealer("玉水祥"), new User_Dealer("郑晓春"), new User_Dealer("侯俊宇"), new User_Dealer("雷克沙"), new User_Dealer("布伟祺"), new User_Dealer("徐新"), new User_Dealer("吴泉"), new User_Dealer("张海东"), new User_Dealer("池绿瑶"), new User_Dealer("雷睿"), new User_Dealer("邓晓莹") };
            //this.hitchReason = new Hitch_Reason[4] { new Hitch_Reason("自恢复"), new Hitch_Reason("非海珠"), new Hitch_Reason("市电掉电"), new Hitch_Reason("重启板卡后恢复") };
            //this.labeler = new User_Labeler[2] { new User_Labeler("徐新"), new User_Labeler("陈光明") };
            //this.hitchLocate = new Hitch_Locate[3] { new Hitch_Locate("江南机楼传输机房2", "桂家琪"), new Hitch_Locate("鹭江机楼四楼传输机房2", "吴泉"), new Hitch_Locate("叠彩园", "邓博") };
            //this.client = new Hitch_Client[3] { new Hitch_Client("乐晓富商贸有限公司", "桂家琪"), new Hitch_Client("广东省民政学校", "桂家琪"), new Hitch_Client("广州人民检察院", "池绿瑶") };
        }
    }
}
